package com.AO.DAO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * MaterialFoodOfSeason entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "material_food_of_season", catalog = "delicacy")
public class MaterialFoodOfSeason implements java.io.Serializable {

	// Fields

	private String materialFoodId;
	private MaterialFood materialFood;

	// Constructors

	/** default constructor */
	public MaterialFoodOfSeason() {
	}

	/** full constructor */
	public MaterialFoodOfSeason(String materialFoodId, MaterialFood materialFood) {
		this.materialFoodId = materialFoodId;
		this.materialFood = materialFood;
	}

	// Property accessors
	@Id
	@Column(name = "material_food_id", unique = true, nullable = false, length = 50)
	public String getMaterialFoodId() {
		return this.materialFoodId;
	}

	public void setMaterialFoodId(String materialFoodId) {
		this.materialFoodId = materialFoodId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public MaterialFood getMaterialFood() {
		return this.materialFood;
	}

	public void setMaterialFood(MaterialFood materialFood) {
		this.materialFood = materialFood;
	}

}